package com.wis.traffic.post.service.impl;

import com.wis.traffic.entity.base.BaseDAO;
import com.wis.traffic.post.base.PostBaseDAOImpl;
import com.wis.traffic.entity.dao.PostTest;
import com.wis.traffic.post.service.PostTestService;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public class PostTestServiceImpl implements PostTestService {
    private String nameSpace = PostTest.class.getName();
    private BaseDAO<PostTest, Serializable> baseDao = new PostBaseDAOImpl<>();

    @Override
    public List<Object> getListByParams(Map<String, Object> params) {
        return baseDao.getObject(nameSpace,"selectListByParams", params);
    }

    @Override
    public Integer insertOrUpdate(PostTest test) {
        return baseDao.insert(nameSpace,test);
    }

    @Override
    public Integer delete(Map<String, Object> params) {
        return baseDao.deleteParam(nameSpace,params);
    }

    @Override
    public PostTest getById(Integer id) {
        return baseDao.getById(nameSpace,id);
    }
}
